Optimal. Leaf size=32 \[ -\frac {c x}{a}-\frac {2 c \cos (e+f x)}{f (a+a \sin (e+f x))} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.03, antiderivative size = 32, normalized size of antiderivative = 1.00, number of steps
used = 2, number of rules used = 2, integrand size = 24, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.083, Rules used = {2814, 2727}
\begin {gather*} -\frac {2 c \cos (e+f x)}{f (a \sin (e+f x)+a)}-\frac {c x}{a} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 2727
Rule 2814
Rubi steps
\begin {align*} \int \frac {c-c \sin (e+f x)}{a+a \sin (e+f x)} \, dx &=-\frac {c x}{a}+(2 c) \int \frac {1}{a+a \sin (e+f x)} \, dx\\ &=-\frac {c x}{a}-\frac {2 c \cos (e+f x)}{f (a+a \sin (e+f x))}\\ \end {align*}
________________________________________________________________________________________
Mathematica [B] Leaf count is larger than twice the leaf count of optimal. \(79\) vs. \(2(32)=64\).
time = 0.13, size = 79, normalized size = 2.47 \begin {gather*} -\frac {c \left (f x \cos \left (\frac {f x}{2}\right )-4 \sin \left (\frac {f x}{2}\right )+f x \sin \left (e+\frac {f x}{2}\right )\right )}{a f \left (\cos \left (\frac {e}{2}\right )+\sin \left (\frac {e}{2}\right )\right ) \left (\cos \left (\frac {1}{2} (e+f x)\right )+\sin \left (\frac {1}{2} (e+f x)\right )\right )} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.21, size = 38, normalized size = 1.19
method | result | size |
risch | \(-\frac {c x}{a}-\frac {4 c}{f a \left ({\mathrm e}^{i \left (f x +e \right )}+i\right )}\) | \(32\) |
derivativedivides | \(\frac {2 c \left (-\frac {2}{\tan \left (\frac {f x}{2}+\frac {e}{2}\right )+1}-\arctan \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )\right )\right )}{f a}\) | \(38\) |
default | \(\frac {2 c \left (-\frac {2}{\tan \left (\frac {f x}{2}+\frac {e}{2}\right )+1}-\arctan \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )\right )\right )}{f a}\) | \(38\) |
norman | \(\frac {\frac {4 c \tan \left (\frac {f x}{2}+\frac {e}{2}\right )}{a f}+\frac {4 c \left (\tan ^{3}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{a f}-\frac {c x}{a}-\frac {c x \tan \left (\frac {f x}{2}+\frac {e}{2}\right )}{a}-\frac {c x \left (\tan ^{2}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{a}-\frac {c x \left (\tan ^{3}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{a}}{\left (1+\tan ^{2}\left (\frac {f x}{2}+\frac {e}{2}\right )\right ) \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )+1\right )}\) | \(128\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [B] Leaf count of result is larger than twice the leaf count of optimal. 83 vs.
\(2 (34) = 68\).
time = 0.53, size = 83, normalized size = 2.59 \begin {gather*} -\frac {2 \, {\left (c {\left (\frac {\arctan \left (\frac {\sin \left (f x + e\right )}{\cos \left (f x + e\right ) + 1}\right )}{a} + \frac {1}{a + \frac {a \sin \left (f x + e\right )}{\cos \left (f x + e\right ) + 1}}\right )} + \frac {c}{a + \frac {a \sin \left (f x + e\right )}{\cos \left (f x + e\right ) + 1}}\right )}}{f} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.32, size = 68, normalized size = 2.12 \begin {gather*} -\frac {c f x + {\left (c f x + 2 \, c\right )} \cos \left (f x + e\right ) + {\left (c f x - 2 \, c\right )} \sin \left (f x + e\right ) + 2 \, c}{a f \cos \left (f x + e\right ) + a f \sin \left (f x + e\right ) + a f} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [B] Leaf count of result is larger than twice the leaf count of optimal. 90 vs.
\(2 (27) = 54\).
time = 0.64, size = 90, normalized size = 2.81 \begin {gather*} \begin {cases} - \frac {c f x \tan {\left (\frac {e}{2} + \frac {f x}{2} \right )}}{a f \tan {\left (\frac {e}{2} + \frac {f x}{2} \right )} + a f} - \frac {c f x}{a f \tan {\left (\frac {e}{2} + \frac {f x}{2} \right )} + a f} - \frac {4 c}{a f \tan {\left (\frac {e}{2} + \frac {f x}{2} \right )} + a f} & \text {for}\: f \neq 0 \\\frac {x \left (- c \sin {\left (e \right )} + c\right )}{a \sin {\left (e \right )} + a} & \text {otherwise} \end {cases} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.42, size = 37, normalized size = 1.16 \begin {gather*} -\frac {\frac {{\left (f x + e\right )} c}{a} + \frac {4 \, c}{a {\left (\tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) + 1\right )}}}{f} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 6.64, size = 45, normalized size = 1.41 \begin {gather*} \frac {c\,\left (e+f\,x\right )-c\,\left (e+f\,x+4\right )}{a\,f\,\left (\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )+1\right )}-\frac {c\,x}{a} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________